import request from '@/utils/request'

// 查询sn关联列表
export function listInventory(query) {
  return request({
    url: '/mes/pro/sninventory/list',
    method: 'get',
    params: query
  })
}

// 查询sn关联详细
export function getInventory(snId) {
  return request({
    url: '/mes/pro/sninventory/' + snId,
    method: 'get'
  })
}

// 新增sn关联
export function addInventory(data) {
  return request({
    url: '/mes/pro/sninventory',
    method: 'post',
    data: data
  })
}

// 修改sn关联
export function updateInventory(data) {
  return request({
    url: '/mes/pro/sninventory',
    method: 'put',
    data: data
  })
}

// 删除sn关联
export function delInventory(snId) {
  return request({
    url: '/mes/pro/sninventory' + snId,
    method: 'delete'
  })
}
